class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: D = None
        self.o: G = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.r: E = None
        self.v: H = None
        self.q: C = None
        self.o: G = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.t: B = None
        self.q: A = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.y: D = None
        self.v: G = None
        self.o: H = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: C = None
        self.r: E = None
        self.v: H = None
        self.q: C = None
        self.o: G = None
        self.y: G = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: G = None
        self.t: B = None
        self.q: A = None
        self.r: A = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.y: D = None
        self.v: G = None
        self.o: H = None
        self.x: F = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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