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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: I = None
        self.s: C = None
        self.r: C = None
        self.u: C = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: I = None
        self.s: C = None
        self.r: C = None
        self.u: C = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

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

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

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