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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: G = None
        self.o: B = None
        self.z: C = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.o: C = None
        self.t: F = None
        self.w: A = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.t: F = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.t: E = None
        self.u: F = None
        self.v: A = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

c = A("c")
a = B("a")
f = C("f")
m = D("m")
j = E("j")
d = F("d")
e = G("e")
l = H("l")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: G = None
        self.o: B = None
        self.z: C = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: H = None
        self.o: C = None
        self.t: F = None
        self.w: A = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.t: F = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.t: E = None
        self.u: F = None
        self.v: A = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

c = A("c")
a = B("a")
f = C("f")
m = D("m")
j = E("j")
d = F("d")
e = G("e")
l = H("l")
h = B("h")

c.o = d
a.y = f
a.z = f
a.x = e
a.o = h
a.w = h
a.v = m
f.q = l
f.z = c
m.y = l
m.r = l
m.o = f
m.t = d
m.w = c
m.v = c
m.x = a
j.q = f
j.p = l
j.t = d
j.o = d
j.u = a
d.t = j
d.o = j
d.r = j
d.q = c
d.y = l
d.v = l
d.u = h
e.u = c
e.p = m
l.z = c
l.v = c
l.p = e
l.t = j
l.u = d
l.s = f
l.y = h
h.y = f
h.z = f
h.x = e
h.o = a
h.w = a
h.v = m
assert d.q.o.q.o.q.o.t.txt == "j"