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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
c = C("c")
n = D("n")
g = E("g")
j = F("j")
l = A("l")
k = C("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
c = C("c")
n = D("n")
g = E("g")
j = F("j")
l = A("l")
k = C("k")

i.q = j
i.u = j
e.s = i
e.r = n
e.y = n
c.o = n
c.t = i
c.y = k
n.w = k
n.r = i
g.t = k
j.r = c
j.s = e
j.o = e
j.u = n
j.p = n
j.x = i
l.q = j
l.u = j
k.o = n
k.t = i
k.y = c
assert c.t.u.o.r.r.u.x.txt == "i"