class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: G = None
        self.r: F = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.y: D = None
        self.x: C = None
        self.q: A = None
        self.o: F = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.y: D = None
        self.x: C = None
        self.q: A = None
        self.o: F = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: H = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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