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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

a = A("a")
c = B("c")
h = C("h")
f = D("f")
e = E("e")
l = F("l")
m = G("m")
i = E("i")
d = B("d")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

a = A("a")
c = B("c")
h = C("h")
f = D("f")
e = E("e")
l = F("l")
m = G("m")
i = E("i")
d = B("d")

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