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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

c = A("c")
k = B("k")
g = C("g")
m = D("m")
f = E("f")
n = F("n")
j = G("j")
a = B("a")
l = C("l")

c.v = k
c.x = k
c.s = l
c.p = l
k.u = l
k.r = c
k.q = c
k.w = m
k.x = m
k.s = n
k.v = a
g.w = l
g.y = f
g.s = f
g.v = m
g.q = c
m.u = l
m.q = f
m.y = c
m.x = a
m.r = j
f.q = c
f.t = j
n.z = c
n.q = c
j.p = c
j.v = n
j.u = f
a.u = g
a.r = c
a.q = c
a.w = m
a.x = m
a.s = n
a.v = k
l.w = g
l.y = f
l.s = f
l.v = m
l.q = c
assert a.u.w.s.t.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.s: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.txt = txt

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

c = A("c")
k = B("k")
g = C("g")
m = D("m")
f = E("f")
n = F("n")
j = G("j")
a = B("a")
l = C("l")

c.v = k
c.x = k
c.s = l
c.p = l
k.u = l
k.r = c
k.q = c
k.w = m
k.x = m
k.s = n
k.v = a
g.w = l
g.y = f
g.s = f
g.v = m
g.q = c
m.u = l
m.q = f
m.y = c
m.x = a
m.r = j
f.q = c
f.t = j
n.z = c
n.q = c
j.p = c
j.v = n
j.u = f
a.u = g
a.r = c
a.q = c
a.w = m
a.x = m
a.s = n
a.v = k
l.w = g
l.y = f
l.s = f
l.v = m
l.q = c
assert a.u.w.s.t.u.q.txt == "c"