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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

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

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

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