class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.w: H = None
        self.s: E = None
        self.t: E = None
        self.z: E = None
        self.o: E = None
        self.x: C = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.v: C = None
        self.s: C = None
        self.o: J = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.w: G = None
        self.s: B = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.y: D = None
        self.q: G = None
        self.w: C = None
        self.v: H = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.x: H = None
        self.r: C = None
        self.o: B = None
        self.z: I = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.v: C = None
        self.s: C = None
        self.o: J = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: A = None
        self.w: G = None
        self.s: B = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: A = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.y: D = None
        self.q: G = None
        self.w: C = None
        self.v: H = None
        self.x: B = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.x: H = None
        self.r: C = None
        self.o: B = None
        self.z: I = None
        self.t: C = None
        self.txt = txt

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

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