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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

k = A("k")
a = B("a")
g = C("g")
c = D("c")
l = E("l")
h = F("h")
n = F("n")
e = B("e")
m = A("m")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

k = A("k")
a = B("a")
g = C("g")
c = D("c")
l = E("l")
h = F("h")
n = F("n")
e = B("e")
m = A("m")

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