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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.t: C = None
        self.p: C = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.s: A = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: D = None
        self.t: C = None
        self.p: C = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.y: B = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.s: A = None
        self.u: B = None
        self.txt = txt

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

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