class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: D = None
        self.r: E = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: C = None
        self.r: A = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: C = None
        self.r: A = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

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

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