class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.r: B = None
        self.u: B = None
        self.q: G = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: J = None
        self.t: G = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: J = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: J = None
        self.t: G = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: J = None
        self.t: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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