class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.o: A = None
        self.u: D = None
        self.v: A = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.w: D = None
        self.v: B = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: G = None
        self.o: A = None
        self.u: D = None
        self.v: A = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.w: D = None
        self.v: B = None
        self.q: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.x: C = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: D = None
        self.y: A = None
        self.txt = txt

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

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