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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: D = None
        self.t: F = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: G = None
        self.o: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.x: A = None
        self.z: F = None
        self.q: A = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: D = None
        self.t: F = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: G = None
        self.o: F = None
        self.w: G = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.x: A = None
        self.z: F = None
        self.q: A = None
        self.u: F = None
        self.s: C = None
        self.txt = txt

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

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