class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.o: F = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.t: C = None
        self.x: E = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.o: F = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

j = A("j")
d = B("d")
i = C("i")
f = D("f")
c = E("c")
n = F("n")
h = F("h")
k = F("k")
e = B("e")
g = C("g")

j.q = e
j.u = f
j.t = f
j.o = n
j.r = k
d.v = c
d.x = c
d.u = f
d.p = f
d.t = g
i.z = d
i.u = f
i.s = f
i.v = f
f.o = k
f.v = j
f.r = h
f.z = c
f.y = c
c.t = e
n.v = d
n.x = d
n.o = k
n.y = c
n.r = f
h.v = e
h.x = e
h.o = k
h.y = c
h.r = f
k.v = d
k.x = d
k.o = n
k.y = c
k.r = f
e.v = c
e.x = c
e.u = f
e.p = f
e.t = g
g.z = e
g.u = f
g.s = f
g.v = f
assert i.v.o.v.p.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.o: F = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.t: C = None
        self.x: E = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.o: F = None
        self.y: E = None
        self.r: D = None
        self.txt = txt

j = A("j")
d = B("d")
i = C("i")
f = D("f")
c = E("c")
n = F("n")
h = F("h")
k = F("k")
e = B("e")
g = C("g")

j.q = e
j.u = f
j.t = f
j.o = n
j.r = k
d.v = c
d.x = c
d.u = f
d.p = f
d.t = g
i.z = d
i.u = f
i.s = f
i.v = f
f.o = k
f.v = j
f.r = h
f.z = c
f.y = c
c.t = e
n.v = d
n.x = d
n.o = k
n.y = c
n.r = f
h.v = e
h.x = e
h.o = k
h.y = c
h.r = f
k.v = d
k.x = d
k.o = n
k.y = c
k.r = f
e.v = c
e.x = c
e.u = f
e.p = f
e.t = g
g.z = e
g.u = f
g.s = f
g.v = f
assert i.v.o.v.p.v.q.txt == "e"