class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: B = None
        self.r: D = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

k = A("k")
e = B("e")
f = C("f")
m = D("m")
i = E("i")
l = F("l")
h = B("h")

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

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

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

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

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

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

k = A("k")
e = B("e")
f = C("f")
m = D("m")
i = E("i")
l = F("l")
h = B("h")

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