class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.q: D = None
        self.z: A = None
        self.w: F = None
        self.t: F = None
        self.x: E = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: A = None
        self.p: H = None
        self.q: G = None
        self.u: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.z: E = None
        self.w: G = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

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

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

a = A("a")
i = B("i")
m = C("m")
g = D("g")
b = E("b")
f = F("f")
n = G("n")
k = H("k")
h = A("h")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: A = None
        self.p: H = None
        self.q: G = None
        self.u: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.z: E = None
        self.w: G = None
        self.q: E = None
        self.s: D = None
        self.txt = txt

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

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

a = A("a")
i = B("i")
m = C("m")
g = D("g")
b = E("b")
f = F("f")
n = G("n")
k = H("k")
h = A("h")
l = H("l")

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