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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.x: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.s: J = None
        self.r: E = None
        self.o: E = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.t: G = None
        self.z: I = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: J = None
        self.o: A = None
        self.t: I = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.q: J = None
        self.p: I = None
        self.s: H = None
        self.u: J = None
        self.y: J = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: G = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.x: D = None
        self.t: A = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.s: J = None
        self.r: E = None
        self.o: E = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: C = None
        self.t: G = None
        self.z: I = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: J = None
        self.o: A = None
        self.t: I = None
        self.w: B = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.q: J = None
        self.p: I = None
        self.s: H = None
        self.u: J = None
        self.y: J = None
        self.r: I = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: G = None
        self.y: E = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

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

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