class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: B = None
        self.x: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.p: F = None
        self.t: D = None
        self.x: D = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.s: C = None
        self.x: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.r: E = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.w: B = None
        self.z: E = None
        self.p: B = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

f = A("f")
i = B("i")
d = C("d")
c = D("c")
m = E("m")
b = F("b")
g = G("g")
h = E("h")
e = F("e")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: E = None
        self.p: F = None
        self.t: D = None
        self.x: D = None
        self.y: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.s: C = None
        self.x: F = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.r: E = None
        self.x: E = None
        self.q: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.w: B = None
        self.z: E = None
        self.p: B = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

f = A("f")
i = B("i")
d = C("d")
c = D("c")
m = E("m")
b = F("b")
g = G("g")
h = E("h")
e = F("e")
a = D("a")

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