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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.o: D = None
        self.t: E = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.w: E = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

a = A("a")
c = B("c")
e = C("e")
f = D("f")
k = E("k")
n = F("n")
b = G("b")
m = B("m")
l = A("l")
h = F("h")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.o: D = None
        self.t: E = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.w: E = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

a = A("a")
c = B("c")
e = C("e")
f = D("f")
k = E("k")
n = F("n")
b = G("b")
m = B("m")
l = A("l")
h = F("h")

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