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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.u: B = None
        self.r: G = None
        self.t: G = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: D = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

d = A("d")
k = B("k")
a = C("a")
e = D("e")
g = E("g")
l = F("l")
b = G("b")
c = B("c")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.u: B = None
        self.r: G = None
        self.t: G = None
        self.z: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: D = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

d = A("d")
k = B("k")
a = C("a")
e = D("e")
g = E("g")
l = F("l")
b = G("b")
c = B("c")
m = D("m")

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