class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: F = None
        self.y: D = None
        self.v: C = None
        self.p: D = None
        self.w: D = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: F = None
        self.v: C = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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