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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.s: D = None
        self.t: I = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: J = None
        self.w: E = None
        self.v: B = None
        self.z: J = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: J = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.s: D = None
        self.t: I = None
        self.u: I = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: J = None
        self.w: E = None
        self.v: B = None
        self.z: J = None
        self.p: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.z: F = None
        self.v: G = None
        self.txt = txt

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

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