class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.u: G = None
        self.p: C = None
        self.z: I = None
        self.v: E = None
        self.q: E = None
        self.o: G = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.s: F = None
        self.z: I = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.v: I = None
        self.p: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.t: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: F = None
        self.w: A = None
        self.y: G = None
        self.s: F = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

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

m = A("m")
d = B("d")
k = C("k")
i = D("i")
j = E("j")
g = F("g")
l = G("l")
b = H("b")
e = I("e")
a = C("a")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.s: F = None
        self.z: I = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.v: I = None
        self.p: A = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: D = None
        self.t: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: F = None
        self.w: A = None
        self.y: G = None
        self.s: F = None
        self.u: E = None
        self.q: F = None
        self.txt = txt

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

m = A("m")
d = B("d")
k = C("k")
i = D("i")
j = E("j")
g = F("g")
l = G("l")
b = H("b")
e = I("e")
a = C("a")

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