class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.p: C = None
        self.u: G = None
        self.o: H = None
        self.r: B = None
        self.y: H = None
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
g = C("g")
c = D("c")
f = E("f")
d = F("d")
k = G("k")
e = H("e")
m = G("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

j = A("j")
l = B("l")
g = C("g")
c = D("c")
f = E("f")
d = F("d")
k = G("k")
e = H("e")
m = G("m")

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