class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.x: B = None
        self.u: B = None
        self.t: F = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.o: F = None
        self.w: F = None
        self.p: C = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

k = A("k")
h = B("h")
j = C("j")
e = D("e")
f = E("f")
c = F("c")
a = G("a")

k.y = e
k.r = c
k.v = a
k.q = j
h.s = f
h.w = c
j.p = h
j.y = k
j.s = f
j.r = e
j.x = c
e.w = a
e.t = h
e.y = c
f.w = j
f.q = h
f.x = h
f.u = h
f.t = c
f.r = c
f.s = c
c.t = e
c.z = j
c.v = j
c.p = a
a.q = j
a.t = j
a.p = j
a.o = c
a.w = c
a.z = f
a.s = k
assert e.y.p.z.w.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: F = None
        self.v: G = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: B = None
        self.x: B = None
        self.u: B = None
        self.t: F = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.v: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.o: F = None
        self.w: F = None
        self.p: C = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

k = A("k")
h = B("h")
j = C("j")
e = D("e")
f = E("f")
c = F("c")
a = G("a")

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