class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.o: I = None
        self.p: F = None
        self.x: C = None
        self.q: E = None
        self.s: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.o: I = None
        self.p: F = None
        self.x: C = None
        self.q: E = None
        self.s: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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