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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: D = None
        self.q: A = None
        self.r: D = None
        self.y: I = None
        self.x: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.s: A = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: D = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: D = None
        self.q: A = None
        self.r: D = None
        self.y: I = None
        self.x: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: E = None
        self.s: A = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

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

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