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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.v: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.q: E = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.v: C = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.q: E = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

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