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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.x: F = None
        self.p: F = None
        self.v: G = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

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

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

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

a = A("a")
n = B("n")
h = C("h")
i = D("i")
j = E("j")
m = F("m")
e = G("e")
k = B("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.x: F = None
        self.p: F = None
        self.v: G = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

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

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

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

a = A("a")
n = B("n")
h = C("h")
i = D("i")
j = E("j")
m = F("m")
e = G("e")
k = B("k")

a.o = i
a.t = e
a.w = h
n.x = j
n.u = h
n.q = h
n.s = k
n.o = m
n.t = m
n.y = e
h.w = e
i.w = m
i.x = m
i.p = m
i.r = j
i.y = j
i.v = e
i.z = k
j.s = a
j.y = m
j.r = h
m.y = e
m.t = h
m.x = i
m.r = i
m.q = k
m.p = k
e.o = a
e.r = a
k.x = j
k.u = h
k.q = h
k.s = n
k.o = m
k.t = m
k.y = e
assert a.o.x.r.v.r.o.txt == "i"