class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.v: C = None
        self.x: F = None
        self.o: E = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.v: C = None
        self.x: F = None
        self.o: E = None
        self.q: C = None
        self.t: C = None
        self.txt = txt

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

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