class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: E = None
        self.q: C = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.s: A = None
        self.t: C = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

i.r = l
i.v = e
i.z = e
i.q = d
g.z = i
g.u = e
g.v = j
g.q = j
d.y = a
d.t = a
d.r = i
d.s = i
d.v = l
d.z = l
j.y = d
e.u = g
l.t = e
l.r = g
a.y = d
a.t = d
a.r = i
a.s = i
a.v = l
a.z = l
assert i.v.u.v.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: E = None
        self.q: C = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: E = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.s: A = None
        self.t: C = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

i.r = l
i.v = e
i.z = e
i.q = d
g.z = i
g.u = e
g.v = j
g.q = j
d.y = a
d.t = a
d.r = i
d.s = i
d.v = l
d.z = l
j.y = d
e.u = g
l.t = e
l.r = g
a.y = d
a.t = d
a.r = i
a.s = i
a.v = l
a.z = l
assert i.v.u.v.y.t.txt == "a"