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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.z: A = None
        self.u: E = None
        self.v: E = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: F = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.z: A = None
        self.u: E = None
        self.v: E = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: F = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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