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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.w: A = None
        self.p: A = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: F = None
        self.w: A = None
        self.p: A = None
        self.u: A = None
        self.x: A = None
        self.txt = txt

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

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

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

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