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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: D = None
        self.z: A = None
        self.p: E = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.x: A = None
        self.s: D = None
        self.y: B = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

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

b = A("b")
h = B("h")
n = C("n")
g = D("g")
d = E("d")
j = F("j")
f = G("f")
e = B("e")
k = E("k")
a = D("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: D = None
        self.z: A = None
        self.p: E = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.t: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: D = None
        self.x: A = None
        self.s: D = None
        self.y: B = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

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

b = A("b")
h = B("h")
n = C("n")
g = D("g")
d = E("d")
j = F("j")
f = G("f")
e = B("e")
k = E("k")
a = D("a")

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