class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: C = None
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.u: D = None
        self.t: J = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.u: D = None
        self.t: J = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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