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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.z: A = None
        self.w: C = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.z: A = None
        self.w: C = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.s: F = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: C = None
        self.txt = txt

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

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