class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.p: H = None
        self.t: B = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: D = None
        self.r: D = None
        self.v: A = None
        self.y: E = None
        self.s: G = None
        self.w: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.o: I = None
        self.t: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.v: H = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: H = None
        self.x: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.x: F = None
        self.t: H = None
        self.p: B = None
        self.q: C = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

m = A("m")
d = B("d")
f = C("f")
a = D("a")
n = E("n")
h = F("h")
e = G("e")
j = H("j")
l = I("l")
k = F("k")

m.z = e
m.y = e
m.v = d
m.t = d
m.u = d
m.p = j
d.y = j
d.v = n
f.x = n
f.y = n
f.p = a
f.r = a
f.v = m
f.s = e
f.w = l
f.t = d
a.y = d
a.v = h
a.o = l
a.t = e
a.z = k
n.z = e
n.w = d
n.u = l
h.x = f
h.q = m
h.p = m
h.v = j
h.s = k
e.r = l
e.s = j
e.x = j
e.t = k
j.w = d
l.w = d
l.p = d
l.v = d
l.r = a
l.x = h
l.t = j
l.q = f
l.o = f
k.x = f
k.q = m
k.p = m
k.v = j
k.s = h
assert a.t.t.q.v.y.w.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.p: H = None
        self.t: B = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: D = None
        self.r: D = None
        self.v: A = None
        self.y: E = None
        self.s: G = None
        self.w: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.o: I = None
        self.t: G = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: B = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.v: H = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: H = None
        self.x: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: D = None
        self.x: F = None
        self.t: H = None
        self.p: B = None
        self.q: C = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

m = A("m")
d = B("d")
f = C("f")
a = D("a")
n = E("n")
h = F("h")
e = G("e")
j = H("j")
l = I("l")
k = F("k")

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