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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.y: E = None
        self.t: E = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.y: E = None
        self.t: E = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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