class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: B = None
        self.y: F = None
        self.z: I = None
        self.s: I = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.r: H = None
        self.q: J = None
        self.z: C = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: E = None
        self.y: B = None
        self.s: C = None
        self.t: C = None
        self.z: E = None
        self.o: D = None
        self.x: J = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.r: H = None
        self.q: J = None
        self.z: C = None
        self.p: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: E = None
        self.y: B = None
        self.s: C = None
        self.t: C = None
        self.z: E = None
        self.o: D = None
        self.x: J = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

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

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

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