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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: F = None
        self.w: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.o: A = None
        self.p: G = None
        self.u: D = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: E = None
        self.v: F = None
        self.o: A = None
        self.t: B = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: G = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: F = None
        self.w: E = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.o: A = None
        self.p: G = None
        self.u: D = None
        self.x: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: E = None
        self.v: F = None
        self.o: A = None
        self.t: B = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: G = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

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

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