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

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

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

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

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

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

f = A("f")
e = B("e")
n = C("n")
a = D("a")
j = E("j")
k = F("k")
b = E("b")
l = A("l")
h = C("h")
i = C("i")

f.o = e
f.r = i
e.q = b
e.v = i
n.z = a
n.r = a
n.v = h
n.w = h
n.o = k
n.p = j
a.z = k
a.w = b
a.y = b
j.v = a
j.r = e
j.s = b
k.s = l
k.y = j
k.w = a
b.v = a
b.r = e
b.s = j
l.o = e
l.r = n
h.z = a
h.r = a
h.v = n
h.w = n
h.o = k
h.p = j
i.z = a
i.r = a
i.v = n
i.w = n
i.o = k
i.p = b
assert f.o.q.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

f = A("f")
e = B("e")
n = C("n")
a = D("a")
j = E("j")
k = F("k")
b = E("b")
l = A("l")
h = C("h")
i = C("i")

f.o = e
f.r = i
e.q = b
e.v = i
n.z = a
n.r = a
n.v = h
n.w = h
n.o = k
n.p = j
a.z = k
a.w = b
a.y = b
j.v = a
j.r = e
j.s = b
k.s = l
k.y = j
k.w = a
b.v = a
b.r = e
b.s = j
l.o = e
l.r = n
h.z = a
h.r = a
h.v = n
h.w = n
h.o = k
h.p = j
i.z = a
i.r = a
i.v = n
i.w = n
i.o = k
i.p = b
assert f.o.q.r.v.txt == "i"