class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.s: E = None
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

d.t = i
d.q = i
d.s = h
d.r = h
d.u = e
i.v = d
i.o = h
i.s = h
g.s = j
g.u = b
j.q = h
j.o = a
h.w = k
h.u = k
h.y = b
h.t = j
h.p = i
h.r = d
k.p = i
e.p = i
a.p = i
b.s = j
b.u = g
assert e.p.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: B = None
        self.s: E = None
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

d.t = i
d.q = i
d.s = h
d.r = h
d.u = e
i.v = d
i.o = h
i.s = h
g.s = j
g.u = b
j.q = h
j.o = a
h.w = k
h.u = k
h.y = b
h.t = j
h.p = i
h.r = d
k.p = i
e.p = i
a.p = i
b.s = j
b.u = g
assert e.p.o.p.txt == "i"