class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.u: D = None
        self.t: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.q: I = None
        self.t: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: I = None
        self.p: C = None
        self.o: I = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.v: B = None
        self.w: A = None
        self.x: J = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.x: B = None
        self.r: G = None
        self.v: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.u: D = None
        self.t: G = None
        self.w: B = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: I = None
        self.q: I = None
        self.t: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: I = None
        self.p: C = None
        self.o: I = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: C = None
        self.v: B = None
        self.w: A = None
        self.x: J = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.x: B = None
        self.r: G = None
        self.v: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

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

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