class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.x: A = None
        self.v: C = None
        self.q: J = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: J = None
        self.u: G = None
        self.q: I = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.u: C = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.x: A = None
        self.v: C = None
        self.q: J = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: J = None
        self.u: G = None
        self.q: I = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.u: C = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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