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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.r: F = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.r: F = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

j.y = h
j.s = h
j.t = h
j.z = i
j.x = i
j.r = l
b.z = l
b.p = i
b.x = i
b.v = j
i.w = c
i.t = b
i.r = d
i.v = a
i.q = a
c.w = j
h.t = j
h.s = a
h.w = i
h.u = d
d.v = j
d.t = j
d.r = l
d.p = l
d.y = i
d.q = i
a.w = j
l.v = j
l.t = j
l.r = d
l.p = d
l.y = i
l.q = i
assert j.t.u.p.q.r.t.txt == "j"