class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.o: A = None
        self.s: B = None
        self.r: E = None
        self.p: F = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.r: E = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.r: E = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: C = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

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

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

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

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