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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: I = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: I = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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