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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.u: B = None
        self.o: H = None
        self.v: F = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.x: A = None
        self.z: C = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.u: B = None
        self.o: H = None
        self.v: F = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.x: A = None
        self.z: C = None
        self.p: G = None
        self.t: G = None
        self.txt = txt

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

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

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