class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.z: D = None
        self.q: F = None
        self.v: E = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.y: E = None
        self.x: H = None
        self.p: E = None
        self.u: E = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.y: E = None
        self.x: H = None
        self.p: E = None
        self.u: E = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

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