class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.p: B = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: D = None
        self.p: B = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.p: A = None
        self.x: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.q: F = None
        self.txt = txt

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

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