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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: H = None
        self.t: H = None
        self.y: A = None
        self.q: H = None
        self.u: H = None
        self.x: I = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: H = None
        self.t: H = None
        self.y: A = None
        self.q: H = None
        self.u: H = None
        self.x: I = None
        self.p: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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