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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.p: E = None
        self.t: E = None
        self.v: H = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
j = C("j")
b = D("b")
i = E("i")
n = F("n")
g = G("g")
m = H("m")

f.p = b
f.s = i
l.y = n
l.w = f
l.p = i
l.t = i
l.o = i
l.v = m
l.q = b
j.z = m
j.t = i
j.s = i
j.o = i
j.v = f
b.v = i
b.x = f
b.s = n
i.y = b
i.r = j
i.z = l
n.r = i
n.q = m
n.s = g
g.x = b
g.p = b
g.s = b
g.w = b
g.u = l
g.r = i
g.o = j
m.q = b
m.r = g
m.x = i
m.u = i
assert f.s.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.p: E = None
        self.t: E = None
        self.v: H = None
        self.o: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

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

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

f = A("f")
l = B("l")
j = C("j")
b = D("b")
i = E("i")
n = F("n")
g = G("g")
m = H("m")

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