class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: H = None
        self.y: D = None
        self.z: F = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.w: C = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.u: F = None
        self.z: D = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: H = None
        self.w: C = None
        self.y: F = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: F = None
        self.u: F = None
        self.z: D = None
        self.y: F = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

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