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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.x: G = None
        self.z: F = None
        self.t: G = None
        self.s: B = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.p: I = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: I = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.x: G = None
        self.z: F = None
        self.t: G = None
        self.s: B = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.p: I = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: I = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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