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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.y: E = None
        self.q: C = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.o: F = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.v: C = None
        self.p: A = None
        self.txt = txt

j = A("j")
d = B("d")
c = C("c")
i = D("i")
l = E("l")
b = F("b")
e = F("e")
f = C("f")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.y: E = None
        self.q: C = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.o: F = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.v: C = None
        self.p: A = None
        self.txt = txt

j = A("j")
d = B("d")
c = C("c")
i = D("i")
l = E("l")
b = F("b")
e = F("e")
f = C("f")

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