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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.p: C = None
        self.t: H = None
        self.r: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.u: F = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: H = None
        self.s: A = None
        self.q: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.t: H = None
        self.v: F = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
g = D("g")
h = E("h")
j = F("j")
l = G("l")
b = H("b")
a = H("a")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.p: C = None
        self.t: H = None
        self.r: E = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.u: F = None
        self.r: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: H = None
        self.s: A = None
        self.q: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: C = None
        self.t: H = None
        self.v: F = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
g = D("g")
h = E("h")
j = F("j")
l = G("l")
b = H("b")
a = H("a")

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