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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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