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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: G = None
        self.t: A = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: G = None
        self.txt = txt

i = A("i")
e = B("e")
j = C("j")
c = D("c")
b = E("b")
a = F("a")
f = G("f")
n = H("n")

i.x = e
i.p = e
i.o = j
i.r = j
e.s = j
e.q = j
e.y = c
e.u = c
e.v = f
e.p = f
e.o = i
e.t = i
j.p = n
j.q = f
j.t = i
j.s = c
c.u = i
c.y = f
b.v = f
b.t = a
a.u = i
a.x = c
f.u = j
f.r = j
f.w = j
f.s = i
f.y = i
f.t = e
n.w = i
n.p = f
assert a.x.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: C = None
        self.r: C = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: G = None
        self.t: A = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: G = None
        self.txt = txt

i = A("i")
e = B("e")
j = C("j")
c = D("c")
b = E("b")
a = F("a")
f = G("f")
n = H("n")

i.x = e
i.p = e
i.o = j
i.r = j
e.s = j
e.q = j
e.y = c
e.u = c
e.v = f
e.p = f
e.o = i
e.t = i
j.p = n
j.q = f
j.t = i
j.s = c
c.u = i
c.y = f
b.v = f
b.t = a
a.u = i
a.x = c
f.u = j
f.r = j
f.w = j
f.s = i
f.y = i
f.t = e
n.w = i
n.p = f
assert a.x.y.t.txt == "e"