class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.z: D = None
        self.q: G = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.z: D = None
        self.q: G = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: B = None
        self.txt = txt

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

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