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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.w: E = None
        self.s: B = None
        self.r: E = None
        self.z: B = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.w: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.r: I = None
        self.s: G = None
        self.t: B = None
        self.w: E = None
        self.o: I = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.w: E = None
        self.s: B = None
        self.r: E = None
        self.z: B = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.w: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.r: I = None
        self.s: G = None
        self.t: B = None
        self.w: E = None
        self.o: I = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

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

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