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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.r: G = None
        self.u: G = None
        self.z: H = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: C = None
        self.t: H = None
        self.o: H = None
        self.s: B = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.p: G = None
        self.x: F = None
        self.o: F = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.r: G = None
        self.u: G = None
        self.z: H = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: C = None
        self.t: H = None
        self.o: H = None
        self.s: B = None
        self.w: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.p: G = None
        self.x: F = None
        self.o: F = None
        self.w: E = None
        self.q: F = None
        self.txt = txt

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

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