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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.t: A = None
        self.z: H = None
        self.x: B = None
        self.y: G = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.t: A = None
        self.z: H = None
        self.x: B = None
        self.y: G = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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