class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.v: A = None
        self.q: C = None
        self.r: J = None
        self.u: J = None
        self.p: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.y: G = None
        self.u: G = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.v: A = None
        self.q: C = None
        self.r: J = None
        self.u: J = None
        self.p: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.y: G = None
        self.u: G = None
        self.s: D = None
        self.r: B = None
        self.txt = txt

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

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

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