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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.p: A = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: E = None
        self.p: A = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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

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