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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

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

i = A("i")
k = B("k")
l = C("l")
f = D("f")
c = E("c")
m = F("m")
d = E("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.y: E = None
        self.txt = txt

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

i = A("i")
k = B("k")
l = C("l")
f = D("f")
c = E("c")
m = F("m")
d = E("d")

i.z = d
i.u = l
i.r = l
i.x = m
k.u = d
k.w = l
k.p = c
k.q = i
k.y = m
l.w = f
l.y = m
l.t = i
f.r = c
f.s = m
f.y = k
f.v = i
c.w = m
c.s = l
c.y = d
m.p = c
m.v = k
d.w = m
d.s = l
d.y = c
assert k.u.w.v.q.u.txt == "l"