class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: I = None
        self.q: J = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.v: E = None
        self.q: A = None
        self.u: J = None
        self.o: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: I = None
        self.w: E = None
        self.r: G = None
        self.z: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.p: I = None
        self.r: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.w: I = None
        self.p: I = None
        self.t: D = None
        self.u: J = None
        self.q: I = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: G = None
        self.v: E = None
        self.q: A = None
        self.u: J = None
        self.o: I = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: I = None
        self.w: E = None
        self.r: G = None
        self.z: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.p: I = None
        self.r: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.w: I = None
        self.p: I = None
        self.t: D = None
        self.u: J = None
        self.q: I = None
        self.y: G = None
        self.x: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

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