class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.s: I = None
        self.t: G = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.s: I = None
        self.t: G = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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