class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.x: E = None
        self.t: C = None
        self.y: A = None
        self.r: F = None
        self.txt = txt

c = A("c")
l = B("l")
j = C("j")
n = D("n")
g = E("g")
k = F("k")
d = F("d")
i = B("i")
a = A("a")

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.x: E = None
        self.t: C = None
        self.y: A = None
        self.r: F = None
        self.txt = txt

c = A("c")
l = B("l")
j = C("j")
n = D("n")
g = E("g")
k = F("k")
d = F("d")
i = B("i")
a = A("a")

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