class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.r: G = None
        self.t: E = None
        self.o: B = None
        self.w: F = None
        self.z: G = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.z: E = None
        self.s: B = None
        self.r: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: E = None
        self.z: E = None
        self.s: B = None
        self.r: D = None
        self.p: C = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

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

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