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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.y: E = None
        self.v: C = None
        self.u: C = None
        self.w: A = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.y: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.y: E = None
        self.v: C = None
        self.u: C = None
        self.w: A = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.y: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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