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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.y: A = None
        self.t: I = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.o: H = None
        self.p: D = None
        self.t: F = None
        self.w: C = None
        self.x: B = None
        self.q: I = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.t: C = None
        self.r: E = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

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

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

b = A("b")
i = B("i")
c = C("c")
k = D("k")
e = E("e")
j = F("j")
h = G("h")
m = H("m")
n = I("n")
g = B("g")

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.y: A = None
        self.t: I = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.o: H = None
        self.p: D = None
        self.t: F = None
        self.w: C = None
        self.x: B = None
        self.q: I = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.t: C = None
        self.r: E = None
        self.z: H = None
        self.o: I = None
        self.txt = txt

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

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

b = A("b")
i = B("i")
c = C("c")
k = D("k")
e = E("e")
j = F("j")
h = G("h")
m = H("m")
n = I("n")
g = B("g")

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