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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.t: H = None
        self.s: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: C = None
        self.o: B = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.o: F = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

f = A("f")
a = B("a")
h = C("h")
n = D("n")
l = E("l")
g = F("g")
d = G("d")
j = H("j")
e = D("e")

f.t = h
a.o = d
a.s = d
a.x = d
a.p = g
a.t = j
a.u = l
h.s = g
n.u = a
n.r = g
l.q = a
l.u = j
l.o = e
l.y = h
g.w = l
g.r = l
g.x = h
g.o = a
g.z = n
d.v = a
d.u = h
d.y = e
d.t = f
j.y = n
j.p = f
j.o = g
j.u = h
j.r = a
e.u = a
e.r = g
assert e.r.x.s.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.t: H = None
        self.s: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: C = None
        self.o: B = None
        self.z: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.o: F = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

f = A("f")
a = B("a")
h = C("h")
n = D("n")
l = E("l")
g = F("g")
d = G("d")
j = H("j")
e = D("e")

f.t = h
a.o = d
a.s = d
a.x = d
a.p = g
a.t = j
a.u = l
h.s = g
n.u = a
n.r = g
l.q = a
l.u = j
l.o = e
l.y = h
g.w = l
g.r = l
g.x = h
g.o = a
g.z = n
d.v = a
d.u = h
d.y = e
d.t = f
j.y = n
j.p = f
j.o = g
j.u = h
j.r = a
e.u = a
e.r = g
assert e.r.x.s.o.t.o.txt == "g"