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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.z: E = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.w: B = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.o: G = None
        self.r: I = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: J = None
        self.z: E = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.w: B = None
        self.x: B = None
        self.v: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.o: G = None
        self.r: I = None
        self.t: I = None
        self.p: H = None
        self.txt = txt

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

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