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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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