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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.o: F = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

i = A("i")
b = B("b")
g = C("g")
h = D("h")
a = E("a")
e = F("e")
c = G("c")
m = H("m")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: F = None
        self.r: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.o: F = None
        self.y: D = None
        self.r: E = None
        self.txt = txt

i = A("i")
b = B("b")
g = C("g")
h = D("h")
a = E("a")
e = F("e")
c = G("c")
m = H("m")

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