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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.z: C = None
        self.r: A = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.z: C = None
        self.r: A = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

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

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