class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: D = None
        self.q: J = None
        self.o: D = None
        self.y: J = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.s: I = None
        self.y: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.z: D = None
        self.x: D = None
        self.w: D = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: B = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.s: I = None
        self.y: F = None
        self.x: D = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: J = None
        self.z: D = None
        self.x: D = None
        self.w: D = None
        self.u: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: B = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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