class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.x: F = None
        self.t: G = None
        self.o: A = None
        self.p: H = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: H = None
        self.y: H = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.p: G = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: G = None
        self.r: D = None
        self.x: D = None
        self.z: G = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.r: E = None
        self.p: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: G = None
        self.x: F = None
        self.t: G = None
        self.o: A = None
        self.p: H = None
        self.y: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.r: H = None
        self.y: H = None
        self.o: A = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.p: G = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: G = None
        self.r: D = None
        self.x: D = None
        self.z: G = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.r: E = None
        self.p: I = None
        self.txt = txt

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

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