class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.q: A = None
        self.z: G = None
        self.o: H = None
        self.u: A = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

c = A("c")
i = B("i")
m = C("m")
g = D("g")
l = E("l")
e = F("e")
k = G("k")
d = H("d")

c.p = i
c.q = m
c.s = g
i.s = e
i.z = g
i.u = k
m.s = e
g.w = l
g.y = k
g.o = c
g.u = d
g.s = d
g.t = e
l.y = k
l.o = k
l.t = i
l.u = d
l.q = d
l.p = m
e.y = l
e.r = l
e.t = m
e.q = c
e.u = c
e.z = k
e.o = d
e.x = g
k.t = e
k.x = e
d.x = g
d.u = i
d.w = m
d.r = k
assert e.o.w.s.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: C = None
        self.q: A = None
        self.z: G = None
        self.o: H = None
        self.u: A = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

c = A("c")
i = B("i")
m = C("m")
g = D("g")
l = E("l")
e = F("e")
k = G("k")
d = H("d")

c.p = i
c.q = m
c.s = g
i.s = e
i.z = g
i.u = k
m.s = e
g.w = l
g.y = k
g.o = c
g.u = d
g.s = d
g.t = e
l.y = k
l.o = k
l.t = i
l.u = d
l.q = d
l.p = m
e.y = l
e.r = l
e.t = m
e.q = c
e.u = c
e.z = k
e.o = d
e.x = g
k.t = e
k.x = e
d.x = g
d.u = i
d.w = m
d.r = k
assert e.o.w.s.o.x.txt == "g"