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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: A = None
        self.p: D = None
        self.r: D = None
        self.t: E = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: C = None
        self.v: A = None
        self.o: C = None
        self.w: E = None
        self.q: F = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.r: H = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: A = None
        self.p: D = None
        self.r: D = None
        self.t: E = None
        self.u: D = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: C = None
        self.v: A = None
        self.o: C = None
        self.w: E = None
        self.q: F = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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