class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.o: A = None
        self.r: H = None
        self.u: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: I = None
        self.q: B = None
        self.o: A = None
        self.y: J = None
        self.s: B = None
        self.z: B = None
        self.x: J = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.u: G = None
        self.t: F = None
        self.x: J = None
        self.w: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: A = None
        self.o: A = None
        self.r: H = None
        self.u: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: I = None
        self.q: B = None
        self.o: A = None
        self.y: J = None
        self.s: B = None
        self.z: B = None
        self.x: J = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.u: G = None
        self.t: F = None
        self.x: J = None
        self.w: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: F = None
        self.txt = txt

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

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