class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.o: B = None
        self.q: H = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.v: H = None
        self.w: E = None
        self.y: F = None
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

b = A("b")
e = B("e")
g = C("g")
l = D("l")
h = E("h")
c = F("c")
a = G("a")
d = H("d")
n = G("n")
i = G("i")

b.v = c
b.w = c
b.o = e
b.q = d
b.u = h
e.u = a
g.y = l
g.r = l
l.t = b
l.s = b
l.o = d
l.v = d
l.w = h
l.y = c
l.z = i
h.o = b
c.p = i
c.y = n
c.w = l
c.q = l
c.x = l
c.t = g
c.v = g
c.o = h
a.u = e
a.q = l
d.p = b
d.t = e
d.y = h
n.u = e
n.q = l
i.u = e
i.q = l
assert e.u.q.y.o.o.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.o: B = None
        self.q: H = None
        self.u: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: H = None
        self.v: H = None
        self.w: E = None
        self.y: F = None
        self.s: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

b = A("b")
e = B("e")
g = C("g")
l = D("l")
h = E("h")
c = F("c")
a = G("a")
d = H("d")
n = G("n")
i = G("i")

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