class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: H = None
        self.p: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
k = C("k")
j = D("j")
d = E("d")
c = F("c")
n = G("n")
f = H("f")
e = A("e")
b = F("b")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: F = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
k = C("k")
j = D("j")
d = E("d")
c = F("c")
n = G("n")
f = H("f")
e = A("e")
b = F("b")

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