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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

n = A("n")
c = B("c")
g = C("g")
k = D("k")
f = E("f")
d = F("d")
i = C("i")
e = A("e")
l = B("l")
h = E("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

n = A("n")
c = B("c")
g = C("g")
k = D("k")
f = E("f")
d = F("d")
i = C("i")
e = A("e")
l = B("l")
h = E("h")

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