class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.v: E = None
        self.x: F = None
        self.y: G = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: D = None
        self.w: H = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

f = A("f")
k = B("k")
j = C("j")
g = D("g")
c = E("c")
b = F("b")
i = G("i")
h = H("h")
l = E("l")

f.z = i
f.y = i
f.s = k
f.v = l
f.p = l
f.q = l
f.x = b
k.q = h
k.w = h
k.u = g
k.s = g
j.q = k
g.t = f
c.p = h
c.z = j
b.t = c
b.z = h
b.o = g
b.p = l
i.t = g
i.o = g
i.u = f
i.s = b
h.r = g
h.v = g
h.s = b
l.p = h
l.z = j
assert l.p.v.t.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.v: E = None
        self.x: F = None
        self.y: G = None
        self.p: E = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: D = None
        self.w: H = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: H = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: A = None
        self.o: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

f = A("f")
k = B("k")
j = C("j")
g = D("g")
c = E("c")
b = F("b")
i = G("i")
h = H("h")
l = E("l")

f.z = i
f.y = i
f.s = k
f.v = l
f.p = l
f.q = l
f.x = b
k.q = h
k.w = h
k.u = g
k.s = g
j.q = k
g.t = f
c.p = h
c.z = j
b.t = c
b.z = h
b.o = g
b.p = l
i.t = g
i.o = g
i.u = f
i.s = b
h.r = g
h.v = g
h.s = b
l.p = h
l.z = j
assert l.p.v.t.s.q.txt == "h"