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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.w: E = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.o: E = None
        self.w: A = None
        self.y: J = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.w: E = None
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.o: E = None
        self.w: A = None
        self.y: J = None
        self.x: I = None
        self.txt = txt

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

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

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

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