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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.o: J = None
        self.r: F = None
        self.w: I = None
        self.s: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: J = None
        self.q: H = None
        self.t: J = None
        self.s: J = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.o: G = None
        self.x: A = None
        self.p: F = None
        self.u: G = None
        self.y: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: D = None
        self.r: A = None
        self.v: A = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.o: J = None
        self.r: F = None
        self.w: I = None
        self.s: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: J = None
        self.q: H = None
        self.t: J = None
        self.s: J = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.o: G = None
        self.x: A = None
        self.p: F = None
        self.u: G = None
        self.y: A = None
        self.z: C = None
        self.v: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.p: D = None
        self.r: A = None
        self.v: A = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

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