class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: D = None
        self.t: H = None
        self.x: E = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: A = None
        self.v: I = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.z: G = None
        self.u: A = None
        self.o: J = None
        self.r: F = None
        self.w: E = None
        self.y: F = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: H = None
        self.w: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: A = None
        self.v: I = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: D = None
        self.z: G = None
        self.u: A = None
        self.o: J = None
        self.r: F = None
        self.w: E = None
        self.y: F = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: H = None
        self.w: A = None
        self.x: J = None
        self.txt = txt

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

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

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