class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: A = None
        self.w: A = None
        self.r: E = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: G = None
        self.v: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.o: C = None
        self.s: E = None
        self.z: A = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.r: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: G = None
        self.v: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: D = None
        self.o: C = None
        self.s: E = None
        self.z: A = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

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

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

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