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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.y: E = None
        self.o: D = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.x: A = None
        self.z: B = None
        self.o: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.y: E = None
        self.o: D = None
        self.r: D = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.x: A = None
        self.z: B = None
        self.o: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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