class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.v: E = None
        self.s: F = None
        self.x: D = None
        self.o: C = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.v: B = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: I = None
        self.q: C = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: D = None
        self.v: B = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: A = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: I = None
        self.q: C = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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