class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: E = None
        self.o: C = None
        self.s: D = None
        self.p: H = None
        self.y: E = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: E = None
        self.u: I = None
        self.o: I = None
        self.z: E = None
        self.y: I = None
        self.v: G = None
        self.w: I = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: C = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: D = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: E = None
        self.u: I = None
        self.o: I = None
        self.z: E = None
        self.y: I = None
        self.v: G = None
        self.w: I = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: C = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

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

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