class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.y: C = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.q: E = None
        self.v: E = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.x: E = None
        self.p: A = None
        self.o: G = None
        self.txt = txt

h = A("h")
b = B("b")
n = C("n")
l = D("l")
c = E("c")
d = F("d")
j = G("j")
f = H("f")

h.o = j
h.r = n
h.y = n
h.q = n
h.w = b
b.o = n
b.t = c
b.v = c
n.y = c
n.q = c
n.v = c
n.s = j
n.r = j
l.t = f
l.r = f
l.v = f
l.z = b
l.p = c
l.o = c
c.u = f
d.o = l
d.u = h
j.s = d
j.v = d
f.z = l
f.w = c
f.x = c
f.p = h
f.o = j
assert f.o.s.o.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: C = None
        self.y: C = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: G = None
        self.q: E = None
        self.v: E = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.x: E = None
        self.p: A = None
        self.o: G = None
        self.txt = txt

h = A("h")
b = B("b")
n = C("n")
l = D("l")
c = E("c")
d = F("d")
j = G("j")
f = H("f")

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