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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.y: E = None
        self.w: E = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

b = A("b")
i = B("i")
m = C("m")
j = D("j")
e = E("e")
k = F("k")
l = F("l")
g = B("g")
h = D("h")

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.y: E = None
        self.w: E = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

b = A("b")
i = B("i")
m = C("m")
j = D("j")
e = E("e")
k = F("k")
l = F("l")
g = B("g")
h = D("h")

b.o = j
b.u = j
b.q = k
b.t = k
b.p = h
i.z = b
i.x = l
m.o = j
j.x = l
j.t = h
j.y = m
e.z = b
k.x = e
k.y = e
k.w = e
k.q = b
k.r = j
k.s = j
l.x = e
l.y = e
l.w = e
l.q = b
l.r = j
l.s = h
g.z = b
g.x = l
h.x = k
h.t = j
h.y = m
assert e.z.t.y.z.txt == "b"