class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.q: A = None
        self.t: D = None
        self.x: E = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.y: E = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.p: E = None
        self.w: G = None
        self.txt = txt

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

g = A("g")
k = B("k")
i = C("i")
j = D("j")
f = E("f")
n = F("n")
e = G("e")
l = G("l")
a = B("a")

g.z = j
k.u = l
k.z = i
k.q = g
k.t = j
k.x = f
k.y = f
k.p = n
i.o = l
i.q = l
i.u = l
i.y = j
j.u = g
j.p = g
j.t = n
j.y = f
j.o = k
f.s = j
n.o = i
n.x = f
n.p = f
n.w = e
e.s = l
e.u = l
e.p = j
e.x = n
e.r = g
l.s = e
l.u = e
l.p = j
l.x = n
l.r = g
a.u = l
a.z = i
a.q = g
a.t = j
a.x = f
a.y = f
a.p = n
assert k.u.x.o.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.q: A = None
        self.t: D = None
        self.x: E = None
        self.y: E = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.q: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.y: E = None
        self.o: B = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.p: E = None
        self.w: G = None
        self.txt = txt

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

g = A("g")
k = B("k")
i = C("i")
j = D("j")
f = E("f")
n = F("n")
e = G("e")
l = G("l")
a = B("a")

g.z = j
k.u = l
k.z = i
k.q = g
k.t = j
k.x = f
k.y = f
k.p = n
i.o = l
i.q = l
i.u = l
i.y = j
j.u = g
j.p = g
j.t = n
j.y = f
j.o = k
f.s = j
n.o = i
n.x = f
n.p = f
n.w = e
e.s = l
e.u = l
e.p = j
e.x = n
e.r = g
l.s = e
l.u = e
l.p = j
l.x = n
l.r = g
a.u = l
a.z = i
a.q = g
a.t = j
a.x = f
a.y = f
a.p = n
assert k.u.x.o.y.t.o.txt == "i"