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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.txt = txt

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

k = A("k")
h = B("h")
d = C("d")
l = D("l")
g = E("g")
j = F("j")
b = B("b")
f = A("f")
e = E("e")
a = D("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: F = None
        self.txt = txt

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

k = A("k")
h = B("h")
d = C("d")
l = D("l")
g = E("g")
j = F("j")
b = B("b")
f = A("f")
e = E("e")
a = D("a")

k.v = b
k.x = g
k.o = d
k.t = f
k.z = j
h.r = d
d.o = a
l.u = d
l.r = d
l.z = d
l.s = a
l.t = e
l.w = j
g.q = a
g.z = j
j.t = f
j.y = d
j.o = d
j.z = b
j.x = e
j.w = k
b.r = d
f.v = b
f.x = e
f.o = d
f.t = k
f.z = j
e.q = a
e.z = j
a.u = d
a.r = d
a.z = d
a.s = l
a.t = e
a.w = j
assert g.z.z.r.txt == "d"